@import "~./atlantic/zul/less/_header.less";

.z-combobutton {
	display: inline-block;
	min-height: @buttonHeight;
	cursor: pointer;

	&-content {
		.fontStyle(@contentFontFamily, @baseFontSize, @fontWeightSemiBold, @buttonColor);
		display: inline-block;
		min-height: @buttonHeight;
		border: 1px solid @buttonBorderColor;
		padding: @paddingSmall - 1 @paddingSize;
		padding-right: @buttonWidth + @paddingSize;
		line-height: @buttonHeight - @paddingSmall * 2;
		background: @buttonBackground;
		vertical-align: middle;
		position: relative;
		white-space: nowrap;
	}
	&-button {
		.displaySize(block, @buttonWidth, 100%);
		border-left: 1px solid @comboButtonBorderColor;
		line-height: normal;
		position: absolute;
		top: 0;
		right: 0;
	}
	&-icon {
		.iconFontStyle(@fontSizeLarge, @buttonColor);
		display: block;
		width: @buttonWidth - 2; //minus border width
		line-height: @buttonHeight - 2; //minus border width
		text-align: center;
	}
	&:hover {
		.z-combobutton-content {
			color: @hoverColor;
			border-color: @hoverBorderColor;
			background: @hoverBackground;
			.boxShadow(inset 0 -1px 0 @hoverShadowColor);
		}
		.z-combobutton-button {
			border-left-color: darken(@hoverBorderColor, 5.6%);
		}
	}
	&:focus {
		.z-combobutton-content,
		.z-combobutton-button {
			color: @focusColor;
			border-color: @focusBorderColor;
			background: @focusBackground;
		}
		.z-combobutton-button {
			border-left-color: darken(@focusBorderColor, 5.6%);
		}
	}
	&:active {
		.z-combobutton-content {
			color: @activeColor;
			border-color: @activeBorderColor;
			background: @activeBackground;
			.boxShadow(inset 0px 1px 0 @activeShadowColor);
		}
		.z-combobutton-button {
			border-left-color: darken(@activeBorderColor, 5.6%);
		}
	}
	&[disabled],
	&[disabled]:hover {
		cursor: default;

		.z-combobutton-content,
		.z-combobutton-button,
		.z-combobutton-icon {
			color: @disabledColor;
			border-color: @disabledBorderColor;
			background: @disabledBackground;
			.opacity(@disabledOpacity);
			.boxShadow(none);
		}
	}

	//toolbar mold
	&-toolbar {
		.z-combobutton-content,
		.z-combobutton-button {
			border-color: transparent;
		}

		&[disabled] {
			.z-combobutton-content,
			.z-combobutton-button {
				border-color: transparent;
			}
		}
	}
}

.ie8 .z-combobutton {
	min-height: @buttonHeight - @baseHeight;

	.z-combobutton-content {
		min-height: @buttonHeight - @baseHeight;
	}
}
